/**
 * Created by Administrator on 2017/3/13 0013.
 */
ControlCenter={
    Create:function(){
        var cc={};
        var whole=new PIXI.DisplayObjectContainer();
        var pageWhole=new PIXI.DisplayObjectContainer();
        var page1,page2,page3,page4,page5;
        cc.Go=function(){
            whole.addChild(pageWhole);
            page1=Page1.Create();
            pageWhole.addChild(page1.ReturnWhole());
            page2=Page2.Create();
            pageWhole.addChild(page2.ReturnWhole());


            document.addEventListener("ShowNetElementInfo2D",function(e){
                page1.Out();
                page2.In(e.detail);
            })
            document.addEventListener("CloseNetElementInfo2D",function(e){
                page1.In();
                page2.Out();
            })


        };
        cc.DoIt=function(){
            if(page1) {
                page1.DoIt();
            }
            if(page2) {
                page2.DoIt();
            }
        }

        cc.ReturnWhole=function(){
            return whole;
        };
        return cc;
    }
}
